#include<bits/stdc++.h>
#define LL long long
#define db double
#define pii pair<int, int>
#define fi first
#define se second

using namespace std;

const int N = 1e5 + 10;
const int INF = 1e9 + 7;
const LL INFF = 1e17 + 7;
const int mod = 1e9 + 7;

int n;
int a[N];
int q[N], h = 1, t = 0;

int main()
{
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);

    ios::sync_with_stdio(0);

    cin >> n;
    for(int i = 1; i <= n; i++) {
        cin >> a[i];
    } sort(a+1, a+n+1);

    int ans = 0;
    q[++t] = a[1];
    for(int i = 2; i <= n; i++) {
        if(a[i] > q[h]) ans ++, h++;
        q[++t] = a[i];
    }
    cout << n - ans;


    return 0;
}
/*
10
136 136 136 2417 136 136 2417 136 136 136
*/
